package com.yinp.proapp.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.yinp.proapp.module.baidu_map.bean.BaiduMapSearchBean;
import com.yinp.proapp.module.baidu_map.bean.BaiduMapSearchImportanceBean;
import com.yinp.proapp.module.task.bean.LocaleTaskBean;

import com.yinp.proapp.greendao.BaiduMapSearchBeanDao;
import com.yinp.proapp.greendao.BaiduMapSearchImportanceBeanDao;
import com.yinp.proapp.greendao.LocaleTaskBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig baiduMapSearchBeanDaoConfig;
    private final DaoConfig baiduMapSearchImportanceBeanDaoConfig;
    private final DaoConfig localeTaskBeanDaoConfig;

    private final BaiduMapSearchBeanDao baiduMapSearchBeanDao;
    private final BaiduMapSearchImportanceBeanDao baiduMapSearchImportanceBeanDao;
    private final LocaleTaskBeanDao localeTaskBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        baiduMapSearchBeanDaoConfig = daoConfigMap.get(BaiduMapSearchBeanDao.class).clone();
        baiduMapSearchBeanDaoConfig.initIdentityScope(type);

        baiduMapSearchImportanceBeanDaoConfig = daoConfigMap.get(BaiduMapSearchImportanceBeanDao.class).clone();
        baiduMapSearchImportanceBeanDaoConfig.initIdentityScope(type);

        localeTaskBeanDaoConfig = daoConfigMap.get(LocaleTaskBeanDao.class).clone();
        localeTaskBeanDaoConfig.initIdentityScope(type);

        baiduMapSearchBeanDao = new BaiduMapSearchBeanDao(baiduMapSearchBeanDaoConfig, this);
        baiduMapSearchImportanceBeanDao = new BaiduMapSearchImportanceBeanDao(baiduMapSearchImportanceBeanDaoConfig, this);
        localeTaskBeanDao = new LocaleTaskBeanDao(localeTaskBeanDaoConfig, this);

        registerDao(BaiduMapSearchBean.class, baiduMapSearchBeanDao);
        registerDao(BaiduMapSearchImportanceBean.class, baiduMapSearchImportanceBeanDao);
        registerDao(LocaleTaskBean.class, localeTaskBeanDao);
    }
    
    public void clear() {
        baiduMapSearchBeanDaoConfig.clearIdentityScope();
        baiduMapSearchImportanceBeanDaoConfig.clearIdentityScope();
        localeTaskBeanDaoConfig.clearIdentityScope();
    }

    public BaiduMapSearchBeanDao getBaiduMapSearchBeanDao() {
        return baiduMapSearchBeanDao;
    }

    public BaiduMapSearchImportanceBeanDao getBaiduMapSearchImportanceBeanDao() {
        return baiduMapSearchImportanceBeanDao;
    }

    public LocaleTaskBeanDao getLocaleTaskBeanDao() {
        return localeTaskBeanDao;
    }

}
